﻿using LightCAD.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace LightCAD.Runtime
{
    public interface IInput
    {
         Action<InputData> FloatTextBoxInput { get; set; }
         Action<InputData> FloatMenuInput { get; set; }
         Action<InputData> CommandBarInput { get; set; }
         Action<InputData> DrawingAreaInput { get; set; }
         Func<InputData, bool> ValidateInput { get; set; }
 
    }
    public enum InputDataType
    {
        Menu,
        Text,
        Rect,
        Point,
        Object,
        Objects
    }
    public enum InputResult
    {
        Succ,
        Cancel,
        Error
    }
    public class InputData
    {
        public InputResult Result { get; set; }
        public InputDataType DataType { get; set; }
        public object Data { get; set; }
    }
    //public class UIEventsProxy
    //{
    //    public LcKeyModifiers KeyModifiers { get; set; }
    //    public void OnPointerPressed(Vector2d position, PointerButtons buttons, KeyModifier keyModifier)
    //    {
    //    }
    //    public void OnPointerMoved() { }
    //    public void OnPointerReleased(Vector2d position, PointerButtons buttons, KeyModifier keyModifier)
    //    {
    //    }
    //    public void OnKeyDown()
    //    {

    //    }
    //}

    public class UISetterProxy
    {
        //设置UI状态的接口
    }
    public class DrawingInputManager
    {

        //public UIEventsProxy EventProxy { get; set; } 

        public async Task<InputData> InputPoint(string tip)
        {
            return new InputData();
        }
    }
}
